import request from '@/utils/request'

// 查询听证告知审批表列表
export function listHearingNoticeApproval(query) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval/list',
    method: 'get',
    params: query,
  })
}

// 查询详细
export function getHearingNoticeApproval(id) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval/' + id,
    method: 'get',
  })
}

// 新增审批
export function addHearingNoticeApproval(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval',
    method: 'post',
    data: data,
  })
}

// 修改审批
export function updateHearingNoticeApproval(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval',
    method: 'put',
    data: data,
  })
}

// 删除审批
export function delHearingNoticeApproval(id) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval/' + id,
    method: 'delete',
  })
}

// 预览

export function previewHearingNoticeApproval(params) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval/preview',
    method: 'get',
    params,
  })
}

// 详情页预览
export function previewPdf(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval/pdfPreview',
    method: 'post',
    data,
  })
}

// 保存附件
export function addHearingNoticeApprovalFiles(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval/addFiles',
    method: 'post',
    data,
  })
}

// 导出
export function exportHearingNoticeApproval(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}

// 立案号下拉
export function getCaseList() {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval/caseList',
    method: 'get',
  })
}

export function getContent(id) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval/getContent?caseId=' + id,
    method: 'get',
  })
}

// 提交流程接口
export function submitHearingNoticeApproval(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval/submit',
    method: 'post',
    data,
  })
}

// 审核接口
export function reviewHearingNoticeApproval(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval/review',
    method: 'post',
    data,
  })
}

// 转办接口
export function transferHearingNoticeApproval(data) {
  return request({
    url: '/ruoyi-system/hearingnoticeapproval/transferTask',
    method: 'post',
    data,
  })
}
